home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 245 / dirtywrd.lst < prev    next >
File List  |  1988-10-10  |  1KB  |  41 lines

  1. Alert 1,"DirtyWord!|Version .001|By Rick Taylor",1,"Uh huh",Dummy
  2. Dim Line$(24) ! Set the maximum amount of lines.
  3. Cls ! Clear the screen.
  4. Print
  5. Print "Press [RETURN] on a blank line to end input."
  6. Print
  7. '
  8. Main:
  9. '
  10. Do
  11.   Inc Line_num ! Increment the line number,
  12.   Print Line_num;"] "; ! and show it on each line.
  13.   Form Input 75,Line$(Line_num) ! 75-char input per line.
  14.   Exit If Line$(Line_num)="" ! Look for a blank line.
  15. Loop ! Do it again...
  16. '
  17. Alert 2," |What will you do?",1,"Save|Quit|Cancel",Answer
  18. '
  19. If Answer=1 ! Save it.
  20.   Fileselect "A:\*.*","TEMP.DAT",F$ ! Get a filename.
  21.   If F$="" ! Oops - no filename given,
  22.     Goto Main ! so go back to the editor.
  23.   Endif
  24.   Open "O",#1,F$ ! Create the file.
  25.   If Line_num=1 ! How do we save just a C/R?
  26.     Inc Line_num ! By adding a fake line!
  27.   Endif
  28.   For Count=1 To Line_num-1 ! Delete the blank line.
  29.     Print #1;Line$(Count) ! Write it.
  30.   Next Count
  31.   Close #1 ! Close the file,
  32.   Run ! and rerun the program.
  33. Endif
  34. '
  35. If Answer=2 ! Quit.
  36.   End
  37. Endif
  38. '
  39. Goto Main ! Continue after CANCEL.
  40.  
  41.